import React from 'react'
import { useSelector, useDispatch } from 'react-redux'
import { add } from '../redux/actions'
export default function Zs() {
  const c = useSelector((state) => {
    return state.zs.c
  })
  const dispatch = useDispatch()
  return (
    <div>
      <h1>zs的代码</h1>
      <p>{c}</p>
      <button
        onClick={() => {
          dispatch(add())
        }}
      >
        +
      </button>
    </div>
  )
}
